package com.example.blogserver.a_utils;

import lombok.Getter;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

@SuppressWarnings({"all"})
@Getter
@Configuration
public class EmailCode {
    public String emailCode;//随机验证码
    public void init(){
        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        while (stringBuilder.length() < 6){
            int c = random.nextInt(10);
            stringBuilder.append(c);
        }
        emailCode = stringBuilder.toString();
    }
}
